home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / earkit / misc / amtelnet / install_amtelnet < prev    next >
Text File  |  1997-02-04  |  16KB  |  386 lines

  1. ;******************************************************************************
  2. ;      ____           ______        __                  __
  3. ;     / __ \         /_  __/       / /                _/ /_
  4. ;    / /_/ /_   _     / /  ______ / /  ______ ______ /  __/
  5. ;   / __  // \_/ \   / /  / ____// /  / __  // ____/ / /
  6. ;  / / / // /__/ /  / /  / __/_ / /_ / / / // __/_  / /_
  7. ; /_/ /_//_/  /_/  /_/  /_____//___//_/ /_//_____/ /___/
  8. ;
  9. ; $VER: 0.91 (February-04-1997) 
  10. ; AmTelnet ©1996-1997 by Mathias Mischler
  11. ; AmTelnet Installer ©1996-1997 by Robert C. Reiswig 
  12. ;
  13. ; If you wish to use any part of this installer you must ask. May not be 
  14. ; integrated/placed into any other package. Changes, suggestions or problems:
  15. ; rcr@netcom.com
  16. ;******************************************************************************
  17.  
  18. ;*** System Stuff ***
  19. (set cpu (database "cpu"))  (set vblank (database "vblank"))
  20. (set graphmem (database "graphics-mem")) (set totmem (database "total-mem"))
  21. (set osver (/ (getversion "LIBS:version.library") 65536))
  22. (if (= vblank "60") ((set blank "NTSC")) ((set blank "PAL")))
  23. (set fastmem (- totmem graphmem))
  24.  
  25. (if (= osver 37) (set workbench "2.0")) (if (= osver 38) (set workbench "2.1"))
  26. (if (= osver 39) (set workbench "3.0")) (if (= osver 40) (set workbench "3.1"))
  27. (if (= osver 41) (set workbench "4.0")) 
  28.  
  29. (set cpu (database "cpu"))
  30. (if (= cpu 68000) (set #cpu 0)) (if (= cpu 68010) (set #cpu 1))
  31. (if (= cpu 68020) (set #cpu 2)) (if (= cpu 68030) (set #cpu 3))
  32. (if (= cpu 68040) (set #cpu 4)) (if (> (exists ("sys:libs/68060.library")) 0) (set #cpu 5) )
  33.  
  34. (set vernum1 (getversion "AmTelnet"))
  35. (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  36. (set AmTelnetver (cat ver1 "." rev1))
  37.  
  38. (set mfound 0) (set newicon1 1) 
  39. (set keeper 1) (set firsttime 0)
  40.  
  41. ;********************************************************************
  42. ; English Strings
  43. ;********************************************************************
  44. (set #about (cat "\n\n\nWelcome to\n\nAmTelnet " AmTelnetver "\n\nCopyright © 1996-1997 by\n\nMathias Mischler\n") )
  45. (set #nomui (cat "\n\nAmTelnet uses Magic User Interface (MUI).\n\nThe installer has not found MUI: to be assigned, "
  46.                  "therefore you AmTelnet will not work correctly.  You will need to install "
  47.                  "MUI before running AmTelnet."
  48.             )
  49. )
  50. (set #whereAmTelnet "Where do you wish to install AmTelnet. A directory called 'AmTelnet' will be created if one is not there. If a copy of AmTelnet is found it will be backed up.")
  51. (set muiver "No Version Installed")
  52. (set #newermui "\nAmTelnet needs version 3.0 or higher of MUI installed to work correctly.\n\nNow would be a good time to Upgrade!\n\nYou can find mui33usr.lha on Aminet in dev/gui\n\nIt looks like you have: \n\n")
  53. (set #need-os "\n\nThe 68020 version of AmTelnet needs version 3.0 or higher of the Amiga OS installed to work correctly.\n\n It looks like you have: \n\n")
  54. (set #000used "\n\nThe 68000 version will be installed.") 
  55. (set #filethere1 "\n\nThe installer has found AmTelnet version ")
  56. (set #filethere2 " at ")
  57. (set #filethere3 "\n\nThe file will be renamed to ")
  58. (set #filethere4 " and it will then be moved to ")
  59. (set #backuptoXXX "Back-UP to file named 'AmTelnet")
  60. (set #copyover "Copy Over Old Version")
  61. (set #AmTelnetfound "\nThe Installer has found a copy of AmTelnet already installed. What do you want to do?\n")
  62. (set #askcpu "\nCPU Check: What CPU does the machine have that you are installing AmTelnet on? The installer has found:\n")
  63. (set #newicon "\nDo you wish to copy over The AmTelnet Icon from the archive? If you have any ToolTypes already set you should select no.\n")
  64. (set #nonewicon  "No  - ToolTypes already set.")
  65. (set #yesnewicon "Yes - Copy over Icon.")
  66. (set #pickicon "\nAmTelnet has 3 different icons you can use choose from. Which one would you like to use?\n")
  67. (set #nomultiview (cat "The installer could not find multiview or you are running on a 2.x Amiga. "
  68.                        "The AmTelnet Installer will let you choose between 3 different icon to use. Their "
  69.                        "names are:\n\n'AmTelnet - Default'\n'AmTelnet2 - Globe'\n'AmTelnet3 - 4 Faces'\n\n"
  70.                        "You can use a picture viewer to look at the '3Icons.iff' to see the choices side-by-side, "
  71.                        "or you can just look in the drawer from where you are installing AmTelnet from."
  72.                   )
  73. )
  74. (set #whatcat "\nSelect the AmTelnet Language catalog you wish to install.\n")
  75. (set #wherecat "\nWhere do you wish to install the AmTelnet Language Catalog? Default is ")
  76. (set #catnofind "Can not find this catalog in this AmTelnet archive. You may need to get the complete archive from the support site.")
  77. (set #whatdocs "\nWhat AmTelnet documentation would you like to install?\n")
  78. (set #wheredocs "Where would you like the AmTelnet documentation you selected to be installed?")
  79. (set #nofounddocs "\n\nThe Docs that are listed below, from the ones that you selected,  were not found in the AmTelnet archive. You may need to get the complete archive from the support site.")
  80. (set #whatrexx "What AREXX Commands would you like to install? They will be placed in ")
  81. (set #notinthisarc "(* = Not found in this archive.)")
  82. (set #rexxsize1 ". There is about ")
  83. (set #rexxsize2 "K total of AREXX scripts.\n")
  84. (set #rexx1 "Away        - Away/Back script")
  85. (set #rexx2 "Finger      - AmiTCP finger script")
  86. (set #rexx3 "Leave       - Leave a channel w/msg")
  87. (set #rexx4 "WallChop    - Message all Chops on a channel")
  88. (set #rexx5 "SendBrowser - Sends URLs to Broswers")
  89.  
  90. (set #whatsnd "\nWhat Sounds would you like to install? They will be placed in ")
  91. (set #sndsize1 ". There is about ")
  92. (set #sndsize2 "K total of Sound files.\n")
  93. (set #snd1 " Gost Set")
  94. (set #snd2 " Sandro Set")
  95. (set #snd3 " Smkn Set")
  96.  
  97. (set #whatsub "\nWhat Submissions would you like to install? They will be placed in ")
  98. (set #subsize1 ". There is about ")
  99. (set #subsize2 "K total of Submissions files.\n")
  100. (set #sub1 " Extra Icons")
  101. (set #sub2 " Extra ARexx Scripts")
  102. (set #sub3 " Toolmanager Animbrush")
  103.  
  104. (set #oktodelete1 "\nIs it ok to delete the older AmTelnet binary so that the AmTelnet Directory can be made?\n")
  105. (set #oktodelete2 "\nIs it ok to delete the older _renamed_ AmTelnet binary so that the AmTelnet Directory can be made?\n")
  106. (set #ifyoulike (cat "If you like AmTelnet you might want to take a look at AmFTP.  It Includes the following:\n\nHigh speed asynchronous transfers for maximum efficiency, "
  107.                      "Batch download facility, Resume partially received files, FTP-Server Phonebook, Full ADT Support, Full ARexx support, Archie search engine, "
  108.                      "and much more!\n\nAmFTP can be found on Aminet in comm/tcp or\nhttp://www.vapor.com/AmFTP/"
  109.                 )
  110. )
  111.  
  112. (set #updatingmuic "\nUpdating the MUI Classes if needed.\n\n(#?.mcc & #?.mcp)")
  113. (set #nomuiarc "\nThe installer could not find the MUI dir in the archive. Because of this the MUI Classes used by AmTelnet were not installed.\n\n If you are Updating AmTelnet then this is not a problem. If it is your first time installing AmTelnet you will need to get an archive with these files.")
  114. (set #newermui "\nAmTelnet needs version 3.3 or higher of MUI installed to work correctly.\n\nNow would be a good time to Upgrade!\n\nYou can find mui33usr.lha on Aminet in dev/gui\n\nIt looks like you have: \n\n")
  115. (set #nompc "\nThe .MCC files for AmTelnet can not be installed to 'mui:libs/mui'")
  116.  
  117. (set #byebye (cat "\nAmTelnet Install Complete!\n\n" ))
  118. ;********************************************************************
  119. ; Hello
  120. ;********************************************************************
  121. (message #about)
  122. (welcome) 
  123.  
  124. ;********************************************************************
  125. ; MUI installed?
  126. ;********************************************************************
  127. (if (< (exists "mui:") 2)  (message #nomui) )
  128.  
  129. ;********************************************************************
  130. ; Ask where to put AmTelnet & Make dir if needed
  131. ;********************************************************************
  132. (set Package (getassign "AmiTCP"))
  133. (if (= Package "") (set Package (getassign "Inet")) )
  134.  
  135. (set AmTelnetdir  (askdir (prompt #whereAmTelnet)
  136.                (help   #whereAmTelnet)
  137.                     (default Package)
  138.                )  
  139. )
  140.  
  141. (set where AmTelnetdir)
  142.  
  143. (if (= 1 (exists (tackon where "AmTelnet") ) ) 
  144.   (
  145.     (set vernum1 (getversion (tackon where "AmTelnet") ))
  146.     (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  147.     (set AmTelnet_old (cat ver1 "." rev1))
  148.  
  149.     (message (cat #filethere1 ver1 "." rev1 #filethere2 where #filethere3 
  150.                   (cat "AmTelnet" AmTelnet_old) #filethere4 (tackon AmTelnetdir "AmTelnet") )
  151.     )
  152.     
  153.  
  154.     (copyfiles (source (tackon where "AmTelnet"))
  155.                (dest where) 
  156.                (infos)
  157.                (newname (cat "AmTelnet" AmTelnet_old))
  158.     )
  159.     
  160.     (delete (tackon AmTelnetdir "AmTelnet") (prompt #oktodelete1) (help #oktodelete1) (confirm) (infos)) 
  161.     
  162.  
  163.     (if (< (exists (tackon AmTelnetdir "AmTelnet")) 2) (makedir (tackon AmTelnetdir "AmTelnet") (infos)) )    
  164.  
  165.     (copyfiles (source (tackon where (cat "AmTelnet" AmTelnet_old) ))
  166.                        (dest (tackon AmTelnetdir "AmTelnet")) 
  167.                        (infos)
  168.                
  169.     )
  170.  
  171.     (delete (tackon where (cat "AmTelnet" AmTelnet_old)) (prompt #oktodelete2) (help #oktodelete2) (confirm) (infos) ) 
  172.  
  173.     ;(set firsttime 1)
  174.  
  175.   )
  176. )
  177.  
  178. (if (< (exists (tackon AmTelnetdir "AmTelnet")) 2) (makedir (tackon AmTelnetdir "AmTelnet") (infos)) )
  179. (set where (tackon AmTelnetdir "AmTelnet"))
  180. (set @default-dest where)
  181.  
  182. ;********************************************************************
  183. ; Check for AmTelnet020 requs
  184. ;********************************************************************
  185. (set ver 0)
  186. (if (exists "mui:mui") 
  187.  (
  188.   (set vernum (getversion "mui:mui") )
  189.   (set ver (/ vernum 65536)) (set rev (- vernum (* ver 65536) ) )
  190.  
  191.   (if (= ver 7) (set muiver "2.0") )   (if (= ver 8) (set muiver "2.1") )
  192.   (if (= ver 9) (set muiver "2.2") )   (if (= ver 10) (set muiver "2.3") )
  193.   (if (= ver 11) (set muiver "3.0") )  (if (= ver 12) (set muiver "3.1") )
  194.   (if (= ver 13) (set muiver "3.2") )  (if (= ver 14) (set muiver "3.3") )
  195.   (if (= ver 15) (set muiver "3.4") )  (if (= ver 15) (set muiver "3.5") )
  196.   (if (= ver 15) (set muiver "3.6") )  (if (= ver 15) (set muiver "3.7") )
  197.  )
  198. )
  199.  
  200. (if (< ver 11)   ( (message (cat #newermui muiver))   (set cpuPick 0) ))
  201. (if (< osver 39) ( (message (cat #need-os workbench #000used)) (set cpuPick 0) ))
  202.  
  203. ;********************************************************************
  204. ; Check for old & backup
  205. ;********************************************************************
  206. (if (exists (tackon where "AmTelnet")) 
  207.   (
  208.       (set vernum1 (getversion (tackon where "AmTelnet") ))
  209.       (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  210.       (set AmTelnet_old (cat ver1 "." rev1))
  211.  
  212.       (set keeper  (askchoice (choices  (cat #backuptoXXX AmTelnet_old "'")  #copyover)
  213.                      (prompt #AmTelnetfound)
  214.                  (help   #AmTelnetfound)
  215.                      (default 0)
  216.                )
  217.       )    
  218.  
  219.  
  220.       (if (= keeper 0)
  221.          (copyfiles (source (tackon where "AmTelnet"))
  222.                      (dest where) 
  223.                      (infos)
  224.                      (newname (cat "AmTelnet" AmTelnet_old))
  225.          )
  226.       )          
  227.  
  228.       (set firsttime 1)
  229.     
  230.   )
  231. )
  232.  
  233. ;********************************************************************
  234. ; Copy over correct AmTelnet and Icon if wanted
  235. ;********************************************************************
  236. (copyfiles (source "AmTelnet") (dest where) (optional "nofail") )
  237.  
  238. (if (= firsttime 0)  (copyfiles (source "AmTelnet.info") (dest where) (optional "nofail") ) )
  239.  
  240.  
  241. (if (= keeper 0) 
  242.   (
  243.    (set newicon (askchoice (choices #yesnewicon #nonewicon)
  244.                            (prompt #newicon)
  245.                        (help   #newicon)
  246.                            (default 0)
  247.             )
  248.    )
  249.   
  250.    (if (= newicon 0) 
  251.      (copyfiles (source "AmTelnet.info") (dest where)  (optional "nofail") )
  252.    )
  253.  
  254.   )
  255. )
  256.  
  257.  
  258. ;********************************************************************
  259. ; Ask and and copy docs if wanted!
  260. ;********************************************************************
  261. (set nodocs 0)
  262.  
  263. (set docs (askoptions (choices "AmTelnet.Changes")
  264.               (prompt #whatdocs)
  265.                       (help #whatdocs)
  266.                   (default 7)
  267.       )
  268. )
  269.  
  270.  
  271.  
  272. (if (<> docs 0)
  273.  (
  274.    (set docsdir (askdir (prompt #wheredocs)
  275.                (help   #wheredocs)
  276.                     (default where)
  277.                 )  
  278.    )
  279.  
  280.    (if (> (exists "AmTelnet.Changes") 0) 
  281.     (if (IN docs 0) (copyfiles (source "AmTelnet.Changes") (dest docsdir) (infos) (optional "nofail") ) )
  282.     ( (set #nofounddocs (cat #nofounddocs "\n\nAmTelnet.Changes")) (set nodocs 1) )
  283.    )
  284.  
  285.    (if (= nodocs 1) (message #nofounddocs) ) 
  286.  
  287.  )
  288. )
  289.  
  290. ;********************************************************************
  291. ; Copy over #?.mpc|#?.mcc (Need to be in mui:libs/mui)
  292. ;********************************************************************
  293. (if (<> (getassign "mui") "")
  294. (
  295.   (if (> (exists "mui:libs/mui") 0) 
  296.    (
  297.     (working #updatingmuic)
  298.     (foreach "" "#?.mcp"
  299.         (copylib (source (tackon "" @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  300.     )
  301.     (foreach "" "#?.mcc"
  302.         (copylib (source (tackon "" @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  303.     )
  304.    )
  305.  
  306.    (message (cat #newermui muiver #nompc)) 
  307.   )
  308. )
  309. )
  310.  
  311. ;********************************************************************
  312. ; copy keyfile if there 
  313. ;********************************************************************
  314. (if (exists ("RegisterAmTelnet"))
  315.  (copyfiles (source "RegisterAmTelnet") (dest where)  (infos) (optional "nofail") )
  316. )
  317.  
  318. (if (> (exists "AmTelnet.Key") 0)
  319.  (copyfiles (source "AmTelnet.Key") (dest where) (infos) (optional "nofail") ) 
  320. )
  321.  
  322.  
  323. (if (> (exists "animation.txt") 0)
  324.  (copyfiles (source "animation.txt") (dest where) (infos) (optional "nofail") ) 
  325. )
  326. ;********************************************************************
  327. ; Reg stuff 
  328. ;********************************************************************
  329. (if (exists"Register-AmTelnet") 
  330.  (
  331.   (if (< (exists (tackon where "Register-AmTelnet")) 2) (makedir (tackon where "Register-AmTelnet") (infos)) )    
  332.   (if (exists "Register-AmTelnet.info")
  333.     (copyfiles (source "Register-AmTelnet.info") (dest where) (optional "nofail") ) 
  334.   )
  335.   (set whereR (tackon where "Register-AmTelnet"))
  336.  
  337.  
  338.   (set whatreg  (askchoice (choices "English"  "Deutsch" "Francais" "Svenska" )
  339.                            (prompt "What Registration Files (Language) would you like to install?")
  340.                        (help   "What Registration Files (Language) would you like to install?")
  341.                         (default 0)
  342.                 )  
  343.   )
  344.  
  345.   (if (= whatreg 0) ((set basereg "English")  (set baseregTT "English") ) )
  346.   (if (= whatreg 1) ((set basereg "Deutsch")  (set baseregTT "Deutsch") ) )
  347.   (if (= whatreg 2) ((set basereg "Francais") (set baseregTT "French")  ) )
  348.   (if (= whatreg 3) ((set basereg "Svenska")  (set baseregTT "Svenska")  ) )
  349.  
  350.   (if (exists "Register-AmTelnet/RegistrationUtility") 
  351.     (copyfiles (source "Register-AmTelnet/RegistrationUtility")
  352.                (dest whereR) 
  353.     )
  354.   )
  355.  
  356.   (if (exists (tackon "Register-AmTelnet" (cat "Regtool-" basereg ".info")) )
  357.     (copyfiles (source (tackon "Register-AmTelnet" (cat "Regtool-" basereg ".info")) )
  358.                (dest whereR) 
  359.                (newname "RegistrationUtility.info")
  360.     )
  361.   )
  362.  
  363.   (if (exists (tackon "Register-AmTelnet" (cat "Reg_" basereg ".guide")) ) 
  364.     (copyfiles (source (tackon "Register-AmTelnet" (cat "Reg_" basereg ".guide")))
  365.                (dest whereR) 
  366.                (infos)
  367.     )
  368.   )
  369.  
  370.   (if (exists (tackon "Register-AmTelnet" (cat "Reg_" basereg ".doc")) )
  371.     (copyfiles (source (tackon "Register-AmTelnet" (cat "Reg_" basereg ".doc")))
  372.                (dest whereR) 
  373.                (infos)
  374.     )
  375.   )
  376.  
  377.  
  378.  )
  379. )
  380.  
  381. ;********************************************************************
  382. ; AmFTP Plug and End Bye 
  383. ;********************************************************************
  384. ;(message #ifyoulike)
  385. (exit #byebye)
  386.